<h2>DESCRIPTION</h2>

<em>v.reclass</em> allows user to create a new vector map based on
the reclassification of an existing vector map. It also allows the user
to change the <i>key column</i> away from the default of "<b>cat</b>" with
the <b>column</b> option.

<p>Rules file may contain on each row either pair:
<div class="code"><pre>
keyword&nbsp;value
</pre></div>
(separated by space) or comment beginning with '#' (hash). 
Definition of new category begins with keyword <I>cat</I> followed
by the new category value.
Keyword <I>where</I> specifies SQL where condition.



<h2>NOTES</h2>

No table is created for the reclassed map if the <b>column</b> option is
used and the column type is integer (as the result could contain ambiguities).

If the <b>column</b> option is used and the column type is string, a new
table is created containing the newly generated cat numbers and a single
column containing the unique string column values, sorted in alphabetical
order.

<p>For dissolving common boundaries, see 
<em><a href="v.dissolve.html">v.dissolve</a></em>.



<h2>EXAMPLES</h2>


<h3>Example 1: Reclass by rules</h3>

<div class="code"><pre>
v.reclass input=land output=land_u type=boundary rules=land.rcl
</pre></div>

the rules file contains :

<div class="code"><pre>
# land reclass file
cat 1
where use = 'E13' and owner = 'Jara Cimrman'
cat 2
where use = 'E14'
</pre></div>

Produces a new vector area map <em>land_u</em> containing boundaries from
<em>land</em> with area category values selected from database by SQL
select statement:
<br>
<tt>select id from tland where use = 'E13' and owner = 'Jara Cimrman'</tt>
changed to category 1;
<br>
values selected from database by SQL select statement: 
<br>
<tt>select id from tland where use = 'E14'</tt> changed to category 2.


<h3>Example 2: Reclass by attribute column</h3>

(North Carolina sample dataset)<br>

<div class="code"><pre>
v.reclass in=streams out=streams_by_type column=I_vs_P

v.db.select streams_by_type
cat|I_vs_P
1|intermittent
2|perennial
</pre></div>


<h2>KNOWN ISSUES</h2>

No table is created for reclassed layer if <b>rules</b> option is used.


<h2>SEE ALSO</h2>

<em>
<a href="v.dissolve.html">v.dissolve</a>,
<a href="v.extract.html">v.extract</a>
</em>
<p><em><a href="sql.html">GRASS SQL interface</a></em>


<h2>AUTHOR</h2>

R.L. Glenn, USDA, SCS, NHQ-CGIS<br>
from v.reclass to v.db.reclass and later to v.reclass in 5.7 rewritten
by Radim Blazek

<!--
<p>
<i>Last changed: $Date$</i>
-->
